import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { My1Component } from './my1/my1.component';
import { My2Component } from './my2/my2.component';
import { FormsModule } from '@angular/forms';
import { HttpClientModule } from '@angular/common/http';
import { FocusDirective } from './focus.directive';
import { GenderPipe } from './gender.pipe';
import { ProjectTasksListTsComponent } from './tasks/project-tasks-list-ts/project-tasks-list-ts.component';
import { ProjectTasksListTs1Component } from './tasks/project-tasks-list-ts1/project-tasks-list-ts1.component'; // 开启双向数据绑定
import { RouterModule } from '@angular/router';
import { NZ_I18N } from 'ng-zorro-antd/i18n';
import { en_US } from 'ng-zorro-antd/i18n';
import { registerLocaleData } from '@angular/common';
import en from '@angular/common/locales/en';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { IconsProviderModule } from './icons-provider.module';
import { NzLayoutModule } from 'ng-zorro-antd/layout';
import { NzMenuModule } from 'ng-zorro-antd/menu';
import { My22Component } from './my22/my22.component';
import { TextDirective } from './text.directive';

registerLocaleData(en);
@NgModule({
  declarations: [
    AppComponent,
    My1Component,
    My2Component,
    FocusDirective,
    GenderPipe,
    ProjectTasksListTsComponent,
    ProjectTasksListTs1Component,
    My22Component,
    TextDirective,
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    FormsModule,
    HttpClientModule,
    RouterModule.forRoot([
      {
        path: '',
        component: ProjectTasksListTsComponent,
      },
      {
        path: 'ts1/:id',
        component: ProjectTasksListTs1Component,
      },
    ]),
    BrowserAnimationsModule,
    IconsProviderModule,
    NzLayoutModule,
    NzMenuModule,
  ],
  providers: [{ provide: NZ_I18N, useValue: en_US }],
  bootstrap: [AppComponent],
})
export class AppModule {}
